package com.woniu.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.woniu.entity.InviteFireworksRecord;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface InviteFireworksRecordMapper extends BaseMapper<InviteFireworksRecord> {
    @Select("SELECT * FROM invite_fireworks_record AS ifr WHERE ifr.create_time BETWEEN #{startTime} AND #{endTime} AND ifr.first_set_off = 1 AND ifr.send_red_packet = 0 LIMIT #{limit}")
    List<InviteFireworksRecord> findListByTimeAndFsoAndIsrp(@Param("startTime") String startTime, @Param("endTime") String endTime, @Param("limit") Integer limit);
}
